//
//  InformaHeadview.m
//  XingRun
//
//  Created by 赵颜彬 on 17/1/11.
//  Copyright © 2017年 赵颜彬. All rights reserved.
//

#import "InformaHeadview.h"

@interface InformaHeadview()

@property (nonatomic, strong)UILabel *name;

@property (nonatomic, strong)UILabel *Man;

@property (nonatomic, strong)UILabel *a;

@property (nonatomic, strong)UILabel *time;

@end
@implementation InformaHeadview

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.name = [[UILabel alloc] init];
        self.name.text = @"把时间浪费在路上";
        self.name.font = [UIFont fontWithName:@"Helvetica" size:15];
        [self addSubview:_name];
        
        self.Man = [[UILabel alloc] init];
        self.Man.text = @"作者: 孙晓磊";
        self.Man.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self addSubview:_Man];
        
        self.a = [[UILabel alloc] init];
        self.a.text = @"#骑行";
        self.a.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self addSubview:_a];
        
        self.time = [[UILabel alloc] init];
        self.time.text = @"2016-09-16";
        self.time.font = [UIFont fontWithName:@"Helvetica" size:12];
        [self addSubview:_time];
    }
    return self;
}

- (void)layoutSubviews{
    [super layoutSubviews];

    _name.frame =  CGRectMake(10 * WIDTH, 10 * HEIGHT, 355 * WIDTH, 20 * HEIGHT);
    _a.frame =  CGRectMake(10 * WIDTH, 30 * HEIGHT, 40 * WIDTH, 20 * HEIGHT);
    _time.frame = CGRectMake(50 * WIDTH, 30 * HEIGHT, 90 * WIDTH, 20 * HEIGHT);
    _Man.frame = CGRectMake(140 * WIDTH, 30 * HEIGHT, 100 * WIDTH, 20 * HEIGHT);
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
